<?php if (!defined('THINK_PATH')) exit();?> <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>返利记录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/game/Public/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/game/Public/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/game/Public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/game/Public/admin/css/animate.css" rel="stylesheet">
    <link href="/game/Public/admin/css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>返利记录</h5>
                        <div class="ibox-tools">                           
                        </div>
                    </div>
                    <?php if(($gm_admin["role"]) != "1"): ?><div class="ibox-content">
                        <div class="row ">
                        <form method="get" action="<?php echo U('Admin/Admin/rebateList');?>">
                            <div class="col-sm-3 m-b-xs">
                                <select class="input-sm form-control input-s-sm inline" name="keywords">
                                    <option value="">请选择搜索字段</option>
                                    <option value="buyer_id" <?php if(($keywords) == "buyer_id"): ?>selected='selected'<?php endif; ?>>购买人ID</option>
                                    <option value="truename" <?php if(($keywords) == "truename"): ?>selected='selected'<?php endif; ?>>代理姓名</option>
                                </select>
                            </div>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" placeholder="请输入关键词" class="input-sm form-control" value="<?php echo ($keyvalue); ?>" name="keyvalue"> <span class="input-group-btn">
                                        <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
                                </div>
                            </div>
                        </form>
                        </div>
                    </div><?php endif; ?>
                    <div class="ibox-content">

                        <table class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>代理</th>
                                    <th>购买人ID</th>
                                    <th>返利金额</th>
                                    <th>返利时间</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php if(empty($adminList)): ?><tr>
                                <td colspan="12">没有相关数据！</td>
                            </tr><?php endif; ?>
                            <?php if(is_array($adminList)): foreach($adminList as $key=>$v): ?><tr>
                                    <td><?php echo ($v["id"]); ?></td>
                                    <td>
                                    <?php if(empty($v["truename"])): echo ($v["phone"]); endif; ?>
                                    <?php echo ($v["truename"]); ?></td>
                                    <td><a href="<?php echo U('Admin/Admin/adminList');?>?keywords=admin_id&keyvalue=<?php echo ($v["buyer_id"]); ?>"><?php echo ($v["buyer_id"]); ?></a></td>
                                    <td><?php echo ($v["rebate"]); ?></td>
                                    <td><?php echo ($v["addtime"]); ?></td>
                                </tr><?php endforeach; endif; ?> 
                            </tbody>
                                
                        </table>
                        <?php echo ($page); ?>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- 全局js -->
    <script src="/game/Public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/game/Public/admin/js/bootstrap.min.js?v=3.3.6"></script>



    <!-- Peity -->
    <script src="/game/Public/admin/js/plugins/peity/jquery.peity.min.js"></script>

    <!-- 自定义js -->
    <script src="/game/Public/admin/js/content.js?v=1.0.0"></script>


    <!-- iCheck -->
    <script src="/game/Public/admin/js/plugins/iCheck/icheck.min.js"></script>

    <!-- Peity -->
    <!-- <script src="/game/Public/admin/js/demo/peity-demo.js"></script> -->

    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>

    
    

</body>

</html>